package scau.filesystem.util.xml;

import java.util.Map;

import org.dom4j.Document;
import org.dom4j.Element;

public interface XmlControl {
	
	Document init(String filename);
	
	boolean saveXml(String filename); //if filename is null, then save as the old filename, else save as the new filename;
	
	Element getElement(String dom, Map<String, String> attrs);
	
	boolean changeElementText(Element e, String text);
	
	boolean addOrChangeElementAttribute(Element e, String key, String value);
	
	boolean deleteElement(String dom, Map<String, String> attrs);
	
	boolean deleteBeanElement(String name);
	
	boolean deleteAttribute(String dom, Map<String, String> attrs, String key);

	public Element createBeanElement();
	
	public Element addElement(Element father, String e_name);
	
	public Element getRoot();
	
	public boolean ElementExit(String dom, Map<String, String> attrs);
}
